#ifndef TRANSACTION_RECORD_HPP
#define TRANSACTION_RECORD_HPP

#include <QDateTime>
#include <QString>

class TransactionRecord {
public:
  enum class Type { Buy, Sell };

  TransactionRecord(const QString &stockCode, const QString &stockName,
                    Type type, int shares, double price,
                    const QDateTime &time = QDateTime::currentDateTime());

  QString getStockCode() const;
  QString getStockName() const;
  Type getType() const;
  QString getTypeString() const;
  int getShares() const;
  double getPrice() const;
  double getTotal() const;
  QDateTime getTime() const;

private:
  QString m_stockCode;
  QString m_stockName;
  Type m_type;
  int m_shares;
  double m_price;
  double m_total;
  QDateTime m_time;
};

#endif // TRANSACTION_RECORD_HPP
